Skip to main content

ControlledDataGrid

Supplementary DataGrid component for advanced use. Using this component, you can access and modify internal state such as filters or pagination. Use this component together with a useDataGrid hook.
const dataGrid = useDataGrid({
entities: "Article",
})
const applyFilter = () => {
dataGrid.stateMethods.setFilter('title', myFilter)
}
<ControlledDataGrid {...dataGrid}>
<TextCell header="Title" field="title" />
<TextCell header="Author" field="author.name" />
</ControlledDataGrid>
ControlledDataGridProps
ControlledDataGridProps
Intersection of
DataGridContainerPublicProps
DataGridContainerPublicProps
allowAggregateFilterControls
boolean
allowColumnVisibilityControls
boolean
emptyMessage
React.ReactNode
emptyMessageComponent
React.ComponentType<any>
emptyMessageComponentExtraProps
onEntityClick
(entity: EntityAccessor) => void
selectedEntityIds
EntityId[]
tile
React.ReactNode
tileSize
number
ControlledDataGridProps
children*
React.ReactNode
dataGridKey
string
entities*
SugaredQualifiedEntityList["entities"]
itemsPerPage
| number| null
state*
DataGridState
stateMethods*
DataGridStateMethods
Union of
ControlledDataGridProps
component*
React.ComponentType<& DataGridContainerProps& ComponentExtraProps>
componentProps*
ComponentExtraProps